import { RouteRecordRaw } from 'vue-router';

//静态路由(固定的)
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    meta: {
      title: '登录',
    },
    component: () => import('@/views/login/Index.vue'),
  },
  {
    path: '/layout',
    name: 'layout',
    component: () => import('@/views/layout/Layout.vue'),
  },
];

//动态路由 -- 老师权限
export const tchRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/teacher/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/courseTable',
    name: '/courseTable',
    meta: {
      title: '我的课表',
    },
    component: () => import('@/views/teacher/courseTable/Index.vue'),
  },
  {
    path: '/stuInfo',
    name: '/stuInfo',
    component: () => import('@/views/teacher/stuInfo/Index.vue'),
    meta: {
      title: '学生信息管理',
      breadcrumb: '学生信息管理',
    },
  },
  {
    path: '/recruitment',
    name: '/recruitment',
    meta: {
      title: '招新管理',
      breadcrumb: '招新管理',
    },
    children: [
      {
        path: '/recruitmentTable',
        component: () => import('@/views/teacher/recruitment/Index.vue'),
        meta: {
          title: '招新信息',
          breadcrumb: '招新管理 / 招新信息',
        },
      },
      {
        path: '/recruitmentChart',
        component: () => import('@/views/teacher/recruitment/Charts.vue'),
        meta: {
          title: '招新分析',
          breadcrumb: '招新管理 / 招新分析',
        },
      },
    ],
  },

  {
    path: '/stuWork',
    name: '/stuWork',
    meta: {
      title: '就业管理',
      breadcrumb: '就业管理',
    },
    children: [
      {
        path: '/stuWorkTable',
        component: () => import('@/views/teacher/stuWork/Index.vue'),
        meta: {
          title: '就业信息',
          breadcrumb: '就业管理 / 就业信息',
        },
      },
      {
        path: '/stuWorkChart',
        component: () => import('@/views/teacher/stuWork/Charts.vue'),
        meta: {
          title: '就业分析',
          breadcrumb: '就业管理 / 就业分析',
        },
      },
    ],
  },
  {
    path: '/stuScore',
    name: '/stuScore',
    meta: {
      title: '成绩管理',
      breadcrumb: '成绩管理',
    },
    children: [
      {
        path: '/stuScoreTable',
        component: () => import('@/views/teacher/stuScore/Index.vue'),
        meta: {
          title: '成绩信息',
          breadcrumb: '成绩管理 / 成绩信息',
        },
      },
      {
        path: '/examScoreChart',
        component: () => import('@/views/teacher/stuScore/examScoreCharts/Index.vue'),
        meta: {
          title: '按科目分析',
          breadcrumb: '成绩管理 / 按科目分析',
        },
      },
      {
        path: '/stuScoreChart',
        component: () => import('@/views/teacher/stuScore/stuScoreCharts/Index.vue'),
        meta: {
          title: '按学生分析',
          breadcrumb: '成绩管理 / 按学生分析',
        },
      },
    ],
  },
];

//动态路由 -- 学生权限
export const stuRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/student/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/stuInfo',
    name: '/stuInfo',
    component: () => import('@/views/student/stuInfo/Index.vue'),
    meta: {
      title: '学生信息',
      breadcrumb: '学生信息',
    },
  },
  {
    path: '/stuWork',
    name: '/stuWork',
    meta: {
      title: '就业信息',
      breadcrumb: '就业信息',
    },
    children: [
      {
        path: '/stuWorkTable',
        component: () => import('@/views/student/stuWork/Index.vue'),
        meta: {
          title: '表格展示',
          breadcrumb: '就业信息 / 表格展示',
        },
      },
      {
        path: '/stuWorkChart',
        component: () => import('@/views/student/stuWork/Charts.vue'),
        meta: {
          title: '图表分析',
          breadcrumb: '就业信息 / 图表分析',
        },
      },
    ],
  },
  {
    path: '/stuScore',
    name: '/stuScore',
    meta: {
      title: '成绩信息',
      breadcrumb: '成绩信息',
    },
    children: [
      {
        path: '/stuScoreTable',
        component: () => import('@/views/student/stuScore/Index.vue'),
        meta: {
          title: '表格展示',
          breadcrumb: '成绩信息 / 表格展示',
        },
      },
      {
        path: '/examScoreChart',
        component: () => import('@/views/student/stuScore/examScoreCharts/Index.vue'),
        meta: {
          title: '按科目分析',
          breadcrumb: '成绩信息 / 按科目分析',
        },
      },
      {
        path: '/stuScoreChart',
        component: () => import('@/views/student/stuScore/stuScoreCharts/Index.vue'),
        meta: {
          title: '综合分析',
          breadcrumb: '成绩信息 / 综合分析',
        },
      },
    ],
  },
];

//动态路由 -- 管理员老师权限
export const adminRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/teacher/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/courseTable',
    name: '/courseTable',
    meta: {
      title: '我的课表',
    },
    component: () => import('@/views/teacher/courseTable/Index.vue'),
  },
  {
    path: '/tchInfo',
    name: '/tchInfo',
    component: () => import('@/views/admin/tchInfo/Index.vue'),
    meta: {
      title: '教师信息管理',
      breadcrumb: '教师信息管理',
    },
  },
  {
    path: '/stuInfo',
    name: '/stuInfo',
    component: () => import('@/views/admin/stuInfo/Index.vue'),
    meta: {
      title: '学生信息管理',
      breadcrumb: '学生信息管理',
    },
  },
  {
    path: '/recruitment',
    name: '/recruitment',
    meta: {
      title: '招新管理',
      breadcrumb: '招新管理',
    },
    children: [
      {
        path: '/recruitmentTable',
        component: () => import('@/views/admin/recruitment/Index.vue'),
        meta: {
          title: '招新信息',
          breadcrumb: '招新管理 / 招新信息',
        },
      },
      {
        path: '/recruitmentChart',
        component: () => import('@/views/teacher/recruitment/Charts.vue'),
        meta: {
          title: '招新分析',
          breadcrumb: '招新管理 / 招新分析',
        },
      },
    ],
  },

  {
    path: '/stuWork',
    name: '/stuWork',
    meta: {
      title: '就业管理',
      breadcrumb: '就业管理',
    },
    children: [
      {
        path: '/stuWorkTable',
        component: () => import('@/views/teacher/stuWork/Index.vue'),
        meta: {
          title: '就业信息',
          breadcrumb: '就业管理 / 就业信息',
        },
      },
      {
        path: '/stuWorkChart',
        component: () => import('@/views/teacher/stuWork/Charts.vue'),
        meta: {
          title: '就业分析',
          breadcrumb: '就业管理 / 就业分析',
        },
      },
    ],
  },
  {
    path: '/stuScore',
    name: '/stuScore',
    meta: {
      title: '成绩管理',
      breadcrumb: '成绩管理',
    },
    children: [
      {
        path: '/stuScoreTable',
        component: () => import('@/views/teacher/stuScore/Index.vue'),
        meta: {
          title: '成绩信息',
          breadcrumb: '成绩管理 / 成绩信息',
        },
      },
      {
        path: '/examScoreChart',
        component: () => import('@/views/teacher/stuScore/examScoreCharts/Index.vue'),
        meta: {
          title: '按科目分析',
          breadcrumb: '成绩管理 / 按科目分析',
        },
      },
      {
        path: '/stuScoreChart',
        component: () => import('@/views/teacher/stuScore/stuScoreCharts/Index.vue'),
        meta: {
          title: '按学生分析',
          breadcrumb: '成绩管理 / 按学生分析',
        },
      },
    ],
  },
];
